package com.example.demo.controller;

import com.example.demo.atools.config.AutoBean;
import com.example.demo.service.PersonService;
import org.apache.lucene.analysis.snowball.SnowballFilter;
import org.joda.time.LocalDateTime;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * @author xu fei
 * @date 2021年09月06日 17:47
 */

@Component
public class TestTask {

    private Logger logger = LoggerFactory.getLogger(TestTask.class);

    private final PersonService personService= AutoBean.getBean(PersonService.class);

    @Scheduled(cron = "0 /5 * * * ? " )
    public void getPointData(){
        System.out.println(LocalDateTime.now());
        System.out.println(2);
        System.out.println(LocalDateTime.now());

    }

}
